﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics.Contracts;

namespace YasharEl.Infrastructure.TaskEngine.DomainModel
{
    [ContractClass(typeof(TaskManagerContract))]
    public interface ITaskManager
    {
        ITask UpdateTask(long applicationId, long userId, ITask task);
    }

    [ContractClassFor(typeof(ITaskManager))]
    internal abstract class TaskManagerContract : ITaskManager
    {
        public ITask UpdateTask(long applicationId, long userId, ITask task)
        {
            Contract.Requires<ArgumentNullException>(applicationId > 0, "applicationId must be valid positive numeric value.");
            Contract.Requires<ArgumentNullException>(userId > 0, "userId must be valid positive numeric value.");
            Contract.Requires<ArgumentNullException>(task != null, "task could not be null.");

            return default(ITask);
        }
    }
}
